<template>
	<view>
		<view class="article-title text-center margin-sm">{{article.title}}</view>
		<view class="article-content">
			<u-parse :html="article.content"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: 0,
				article: {},
			}
		},
		methods: {
			async getArticleDetail(){
				let res = await this.$api.getArchivesDetail({ id: this.id });
				if(!res.code){
					return;
				}
				this.article = res.data.archivesInfo;
			},
		},
		onLoad(e) {
			this.id = e.id || 0;
			this.getArticleDetail();
		}
	}
</script>

<style lang="scss" scoped>
	.article-title {
		font-size: 50upx;
	}
	.article-content{
		margin-top: 20upx;
		padding: 20upx;
	}
</style>
